package com.yixun.qfbao.model.enums;

/**
 * 重置业务节点：1-到访成功、2-认筹成功、3-认购成功、4-签约成功、5-永不重置
 */
public enum DecisionResetEnum {

    VISIT_SUCCESS(1, "到访成功"),
    PAY_DEPOSTI_SUCCESS(2, "认筹成功"),
    SUBSCRIBE_SUCCESS(3, "认购成功"),
    SIGN_SUCCESS(4, "签约成功"),
    NONE(5, "永不重置");

    public static String getDescByNo(int no) {
        for (DecisionResetEnum decisionResetEnum : DecisionResetEnum.values()) {
            if(no == decisionResetEnum.getNo()) {
                return decisionResetEnum.getDesc();
            }
        }
        return null;
    }

    DecisionResetEnum(int no, String desc) {
        this.no = no;
        this.desc = desc;
    }

    private int no;

    private String desc;

    public int getNo() {
        return no;
    }

    public String getDesc() {
        return desc;
    }
}
